﻿using BankSystemWithCSharp.DataBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace BankSystemWithCSharp
{
    public class LoginController : ILogin
    {
        private BankDataBase bankDB = BankDataBase.Intance;
        public bool Login(string account, string password)
        {
            try
            {
                bankDB.Login(account, password);
                return true;
            }
            catch (DataBaseException ex)
            {
                MessageBox.Show(ex.Message);
                return false;
            }
        }
    }
}